import {listVm} from "@/api/cmdb/vm";

const vm = {
  state: {
    vms: [],
    vmTotal: '',
  },

  mutations: {
    SET_VM: (state, response) => {
      state.vms = response.rows
      state.vmTotal = response.total
    },
  },

  actions: {
    /** 查询vm列表列表 */
    GetVmList({ commit ,state}) {
      listVm().then(response => {
        commit('SET_VM',response)
      });
    },
  }
}

export default vm
